package park;

import java.util.Scanner;

public class J10Account {
	
	public static void main(String [] args){
		

		int aid = 0;
		double balance = 0;
		double interestRate = 0;
		String dateCreated;
		double getMonthlyInterestRate = 0;
		double withDraw = 0;
		double deposit = 0;
		
		Scanner sc = new Scanner(System.in);
		
		System.out.println("계좌번호는?");
		aid = sc.nextInt();
		System.out.println("연간 이자율은?");
		interestRate = sc.nextDouble();
		System.out.println("통장 개설일은?");
		dateCreated = sc.next();
		System.out.println("입금액은?");
		deposit = sc.nextDouble();
		System.out.println("출금액은?");
		withDraw = sc.nextDouble();
		
		withDraw = getWithDraw(balance, withDraw);
		deposit = getDeposit(balance, deposit);
		getMonthlyInterestRate = getMonthlyInterestRate(getMonthlyInterestRate);
		
		System.out.println("계좌" + aid);
		System.out.println("연간이자" + interestRate + "%");
		System.out.println("월간 이자율은 "+getMonthlyInterestRate+"%");
		System.out.println("통장 개설날짜는" + dateCreated);
		System.out.println("입금액은" + deposit + "원");
		System.out.println("출금액은" + withDraw + "원");
		System.out.println("잔액은"+balance);
		
	
		sc.close();
	}
	
	

	private static double getMonthlyInterestRate(double interestRate) {
		
		return (interestRate / 12);
		
		
		
	}

	private static double getDeposit(double balance, double deposit) {
		
		return (balance + deposit);
	}

	private static double getWithDraw(double balance, double withDraw) {
		
		return (balance - withDraw);
	}

}
